<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Insert title here</title>
<link href="/resource/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="/resource/js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="/resource/js/bootstrap.js"></script>
</head>
<body>

	<h3>车辆汇总查询</h3>
	
	 <form action="/getReport" method="post">
	  车牌号：<input type="text" name="cno" value="${carVO.cno}">
	  停车次数：<input type="text" name="count1" value="${carVO.count1}">--<input type="text" name="count2" value="${carVO.count2}">
	  时间范围：<input type="date" name="date1" value='<fmt:formatDate value="${carVO.date1}" pattern='yyyy-MM-dd'/>'>--<input type="date" name="date2" value='<fmt:formatDate value="${carVO.date2}" pattern='yyyy-MM-dd'/>'>
	  <button type="submit">查询</button>
	  
	 
	 
	 </form>

	<table class="table">
		<tr>
			<td>id</td>
			<td>车牌号</td>
			<td>车辆类型</td>
			<td>首次入库时间</td>
			<td>最后出库时间</td>
			<td>停车次数</td>
			<td>总停车时间长</td>
			<td>应付总费</td>
			<td>实收总费</td>
		</tr>
		<c:forEach items="${report }" var="report">

			<tr>
				<td>${report.id }</td>
				<td>${report.cno}</td>
				<td>${report.carType.name }</td>
				<td><fmt:formatDate value="${report.inTime }" pattern="yyyy-MM-dd HH:mm"/> </td>
				<td><fmt:formatDate value="${report.outTime }" pattern="yyyy-MM-dd HH:mm"/> </td>
				<td>${report.count }</td>
				<td>${report.totalMinute }</td>
				<td>${report.moneyYS }</td>
				<td>${report.moneySS }</td>
			</tr>

		</c:forEach>


	</table>
</body>
</html>